const express = require('express');
const app = express();
const port = "4000"

// 解决跨域
const cors = require("cors")
app.use(cors());

// 接收数据
app.use(express.json());
app.use(express.urlencoded({ extended: false }));

// 注册路由
require('./router/index')(app);

app.listen(port, () => {
    console.log(`服务器启动成功：http://localhost:${port}`);
});